Skip to content

feat: Add checkPassword util function#28

Merged
klmhyeonwoo merged 2 commits into
mainfrom
feature/util-workspace
Sep 2, 2025
Merged

feat: Add checkPassword util function#28
klmhyeonwoo merged 2 commits into
mainfrom
feature/util-workspace

Conversation

@klmhyeonwoo
Copy link
Copy Markdown
Member

@klmhyeonwoo klmhyeonwoo commented Sep 1, 2025

Description

  • checkPassword 유틸함수가 추가되었어요, 제가 평소 불편했던 점들을 반영한 함수예요
  • 최소 및 최대 비밀번호, 대문자 및 소문자 유무, 숫자 및 특수문자 유무를 옵션 값을 통해 쉽게 판별할 수 있어요
const [password, SetPassword] = useState();

... 상태 관련 로직


const isValidPassword = validationUtil.checkPassword(value, { requireSpecialChar: true, requireUppercase: true, minLength: 3, maxLength: 15 });

closes: #15

Copilot AI review requested due to automatic review settings September 1, 2025 13:55
@klmhyeonwoo
Copy link
Copy Markdown
Member Author

klmhyeonwoo commented Sep 1, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 68.2% 118 / 173
🔵 Statements 68.2% 118 / 173
🔵 Functions 94.11% 16 / 17
🔵 Branches 91.3% 63 / 69
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
package/validationUtil/checkPassword/index.ts 100% 77.77% 100% 100%
Generated in workflow #44 for commit e207546 by the Vitest Coverage Report Action

@klmhyeonwoo klmhyeonwoo requested a review from prgmr99 September 1, 2025 13:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new password validation utility function checkPassword to the validation utilities package. The function provides flexible password validation with configurable options for length constraints and character requirements.

  • Adds checkPassword function with options for min/max length and character type requirements
  • Includes comprehensive test coverage for various password validation scenarios
  • Updates package exports and documentation to include the new utility

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
package/validationUtil/index.ts Exports the new checkPassword function
package/validationUtil/checkPassword/index.ts Main implementation of the password validation logic
package/validationUtil/checkPassword/index.test.ts Test suite covering valid and invalid password scenarios
README.md Documentation updates with usage examples and API reference

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread package/validationUtil/checkPassword/index.ts Outdated
Comment thread package/validationUtil/checkPassword/index.ts
Copy link
Copy Markdown
Member

@prgmr99 prgmr99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

정말 유용하게 사용할 수 있을 것 같아요!!
고생하셨습니다~~👍👍

@klmhyeonwoo klmhyeonwoo merged commit 7d67816 into main Sep 2, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

validationUtil > isPassword()

3 participants